\hypertarget{group____roots}{
\subsection{Parte Generica}
\label{group____roots}\index{Parte Generica@{Parte Generica}}
}
\subsubsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{structRootFindingBase}{RootFindingBase}
\begin{CompactList}\small\item\em Estrutura de dados para \hyperlink{structRootFindingBase}{RootFindingBase}. \item\end{CompactList}\end{CompactItemize}
\subsubsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef struct \hyperlink{structRootFindingBase}{RootFindingBase} \hyperlink{group____roots_gdb81038cc3cdc5d4af8be9fe0c45f11a}{RootFindingBaseT}
\begin{CompactList}\small\item\em Apelido para struct \hyperlink{structRootFindingBase}{RootFindingBase}. \item\end{CompactList}\end{CompactItemize}
\subsubsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$ \hyperlink{group____roots_gb245c32498c083793bc740a45b118280}{RootFindingBaseCreate} (muParserHandle\_\-t mupObj, \hyperlink{RootFindingCommon_8h_a296fe63994e03408c4ad62794d472e9}{RootFindingDoubleT} $\ast$varPtr)
\begin{CompactList}\small\item\em Cria o objeto \hyperlink{structRootFindingBase}{RootFindingBase}. \item\end{CompactList}\item 
void \hyperlink{group____roots_gaf5d5b67be8d281fefa22e9e7cb4c24b}{RootFindingBaseDelete} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$obj)
\begin{CompactList}\small\item\em Apaga o objeto \hyperlink{structRootFindingBase}{RootFindingBase}. \item\end{CompactList}\item 
\hyperlink{RootFindingCommon_8h_31228d356f5429fa5ba7f206e4dee12f}{RootFindingBoolT} \hyperlink{group____roots_g66563d156c9a25a8316a9c557e0bf7b8}{RootFindingBaseSetRange} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj, \hyperlink{RootFindingCommon_8h_a296fe63994e03408c4ad62794d472e9}{RootFindingDoubleT} a, \hyperlink{RootFindingCommon_8h_a296fe63994e03408c4ad62794d472e9}{RootFindingDoubleT} b)
\begin{CompactList}\small\item\em Define o intervalo para procura da raiz. \item\end{CompactList}\item 
\hyperlink{RootFindingCommon_8h_a296fe63994e03408c4ad62794d472e9}{RootFindingDoubleT} \hyperlink{group____roots_g5d64bcdb5cde64f2e5c757f74e82d336}{RootFindingBaseEval} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj, \hyperlink{RootFindingCommon_8h_a296fe63994e03408c4ad62794d472e9}{RootFindingDoubleT} value)
\begin{CompactList}\small\item\em Avalia a funcao em um ponto. \item\end{CompactList}\item 
\hyperlink{RootFindingCommon_8h_a296fe63994e03408c4ad62794d472e9}{RootFindingDoubleT} \hyperlink{group____roots_g328a1c4011dcb869d32a8b566d1c4b67}{RootFindingBase2nDiffEval} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj, \hyperlink{RootFindingCommon_8h_a296fe63994e03408c4ad62794d472e9}{RootFindingDoubleT} value)
\begin{CompactList}\small\item\em Avalia a 2a. diferencial da funcao em um ponto. \item\end{CompactList}\item 
\hyperlink{RootFindingCommon_8h_a296fe63994e03408c4ad62794d472e9}{RootFindingDoubleT} \hyperlink{group____roots_g4971f377f5d7fdf4d2a55ed324955f09}{RootFindingBaseDiffEval} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj, \hyperlink{RootFindingCommon_8h_a296fe63994e03408c4ad62794d472e9}{RootFindingDoubleT} value)
\begin{CompactList}\small\item\em Avalia a diferencial da funcao em um ponto. \item\end{CompactList}\item 
void \hyperlink{group____roots_gafb0a57a39081653e224b3b7e95774f0}{RootFindingBaseReset} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj)
\begin{CompactList}\small\item\em Reinicializa o objeto struct \hyperlink{structRootFindingBase}{RootFindingBase}. \item\end{CompactList}\item 
int \hyperlink{group____roots_gbcf354e731e02c63652af3a2058e739d}{RootFindingBaseGetErrorCode} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj)
\begin{CompactList}\small\item\em Obtem o codigo de erro. \item\end{CompactList}\item 
int \hyperlink{group____roots_g1712b9a29b6e6b15df2195319d5f5d70}{RootFindingBaseGetStateCode} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj)
\begin{CompactList}\small\item\em Obtem o codigo referente ao estado do objeto. \item\end{CompactList}\item 
const char $\ast$ \hyperlink{group____roots_gcc5a0a8948e4b02a878f8d534c0bc982}{RootFindingBaseGetErrorMessage} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj)
\begin{CompactList}\small\item\em Obtem a mensagem de erro. \item\end{CompactList}\item 
const char $\ast$ \hyperlink{group____roots_ga2434bfeb9592ff54df8601cd1a9a04d}{RootFindingBaseGetStateMessage} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj)
\begin{CompactList}\small\item\em Obtem a mensagem referente ao estado do objeto. \item\end{CompactList}\item 
\hyperlink{RootFindingCommon_8h_31228d356f5429fa5ba7f206e4dee12f}{RootFindingBoolT} \hyperlink{group____roots_gec634820d94c4205729589fc44676b72}{RootFindingBaseHasError} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj)
\begin{CompactList}\small\item\em Verifica se ha erros. \item\end{CompactList}\item 
static \hyperlink{RootFindingCommon_8h_31228d356f5429fa5ba7f206e4dee12f}{RootFindingBoolT} \hyperlink{group____roots_g0a4ce2e4b5aee1fe78afe76b2a2bf71e}{isRangeError} (\hyperlink{structRootFindingBase}{RootFindingBaseT} $\ast$rootsObj)
\begin{CompactList}\small\item\em Verify if errorCode is a RangeError. \item\end{CompactList}\end{CompactItemize}


\subsubsection{Typedef Documentation}
\hypertarget{group____roots_gdb81038cc3cdc5d4af8be9fe0c45f11a}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseT@{RootFindingBaseT}}
\index{RootFindingBaseT@{RootFindingBaseT}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseT]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf RootFindingBase} {\bf RootFindingBaseT}}\hfill}
\label{group____roots_gdb81038cc3cdc5d4af8be9fe0c45f11a}


Apelido para struct \hyperlink{structRootFindingBase}{RootFindingBase}. 



Definition at line 83 of file RootFindingBase.h.

\subsubsection{Function Documentation}
\hypertarget{group____roots_g0a4ce2e4b5aee1fe78afe76b2a2bf71e}{
\index{\_\-roots@{\_\-roots}!isRangeError@{isRangeError}}
\index{isRangeError@{isRangeError}!_roots@{\_\-roots}}
\paragraph[isRangeError]{\setlength{\rightskip}{0pt plus 5cm}static {\bf RootFindingBoolT} isRangeError ({\bf RootFindingBaseT} $\ast$ {\em rootsObj})\hspace{0.3cm}{\tt  \mbox{[}static, private\mbox{]}}}\hfill}
\label{group____roots_g0a4ce2e4b5aee1fe78afe76b2a2bf71e}


Verify if errorCode is a RangeError. 



Definition at line 71 of file RootFindingBase.c.

References RootFindingBase::errorCode.

Referenced by RootFindingBaseSetRange().\hypertarget{group____roots_g328a1c4011dcb869d32a8b566d1c4b67}{
\index{\_\-roots@{\_\-roots}!RootFindingBase2nDiffEval@{RootFindingBase2nDiffEval}}
\index{RootFindingBase2nDiffEval@{RootFindingBase2nDiffEval}!_roots@{\_\-roots}}
\paragraph[RootFindingBase2nDiffEval]{\setlength{\rightskip}{0pt plus 5cm}{\bf RootFindingDoubleT} RootFindingBase2nDiffEval ({\bf RootFindingBaseT} $\ast$ {\em rootsObj}, \/  {\bf RootFindingDoubleT} {\em value})}\hfill}
\label{group____roots_g328a1c4011dcb869d32a8b566d1c4b67}


Avalia a 2a. diferencial da funcao em um ponto. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rootsObj}]Ponteiro para o objeto struct \hyperlink{structRootFindingBase}{RootFindingBase} \item[{\em value}]Valor do ponto a ser avaliado \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Avaliacao da 2a. dif da funcao no ponto \end{Desc}


Definition at line 117 of file RootFindingBase.c.

References Mup2ndDiff(), RootFindingBase::mupObj, and RootFindingBase::varPtr.

Referenced by RootFindingCordasInit(), and RootFindingNewtonRhapsonInit().\hypertarget{group____roots_gb245c32498c083793bc740a45b118280}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseCreate@{RootFindingBaseCreate}}
\index{RootFindingBaseCreate@{RootFindingBaseCreate}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseCreate]{\setlength{\rightskip}{0pt plus 5cm}{\bf RootFindingBaseT}$\ast$ RootFindingBaseCreate (muParserHandle\_\-t {\em mupObj}, \/  {\bf RootFindingDoubleT} $\ast$ {\em varPtr})}\hfill}
\label{group____roots_gb245c32498c083793bc740a45b118280}


Cria o objeto \hyperlink{structRootFindingBase}{RootFindingBase}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mupObj}]Ponteiro para o objeto muParser contendo a expressao \item[{\em varPtr}]Pontero para a variavel relacionada a expressao no objeto muParser referente a qual eixo deve se procurar a raiz \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Ponteiro para o objeto criado \end{Desc}


Definition at line 32 of file RootFindingBase.c.

References RootFindingBase::mupObj, RootFindingBaseReset(), RootFindingPegaso::rootsObj, and RootFindingBase::varPtr.\hypertarget{group____roots_gaf5d5b67be8d281fefa22e9e7cb4c24b}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseDelete@{RootFindingBaseDelete}}
\index{RootFindingBaseDelete@{RootFindingBaseDelete}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseDelete]{\setlength{\rightskip}{0pt plus 5cm}void RootFindingBaseDelete ({\bf RootFindingBaseT} $\ast$ {\em obj})}\hfill}
\label{group____roots_gaf5d5b67be8d281fefa22e9e7cb4c24b}


Apaga o objeto \hyperlink{structRootFindingBase}{RootFindingBase}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em obj}]Ponteiro para o objeto \hyperlink{structRootFindingBase}{RootFindingBase} \end{description}
\end{Desc}


Definition at line 61 of file RootFindingBase.c.\hypertarget{group____roots_g4971f377f5d7fdf4d2a55ed324955f09}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseDiffEval@{RootFindingBaseDiffEval}}
\index{RootFindingBaseDiffEval@{RootFindingBaseDiffEval}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseDiffEval]{\setlength{\rightskip}{0pt plus 5cm}{\bf RootFindingDoubleT} RootFindingBaseDiffEval ({\bf RootFindingBaseT} $\ast$ {\em rootsObj}, \/  {\bf RootFindingDoubleT} {\em value})}\hfill}
\label{group____roots_g4971f377f5d7fdf4d2a55ed324955f09}


Avalia a diferencial da funcao em um ponto. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rootsObj}]Ponteiro para o objeto struct \hyperlink{structRootFindingBase}{RootFindingBase} \item[{\em value}]Valor do ponto a ser avaliado \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Avaliacao da dif da funcao no ponto \end{Desc}


Definition at line 124 of file RootFindingBase.c.

References MupDiff(), RootFindingBase::mupObj, and RootFindingBase::varPtr.

Referenced by getNextX().\hypertarget{group____roots_g5d64bcdb5cde64f2e5c757f74e82d336}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseEval@{RootFindingBaseEval}}
\index{RootFindingBaseEval@{RootFindingBaseEval}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseEval]{\setlength{\rightskip}{0pt plus 5cm}{\bf RootFindingDoubleT} RootFindingBaseEval ({\bf RootFindingBaseT} $\ast$ {\em rootsObj}, \/  {\bf RootFindingDoubleT} {\em value})}\hfill}
\label{group____roots_g5d64bcdb5cde64f2e5c757f74e82d336}


Avalia a funcao em um ponto. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rootsObj}]Ponteiro para o objeto struct \hyperlink{structRootFindingBase}{RootFindingBase} \item[{\em value}]Valor do ponto a ser avaliado \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Avaliacao da funcao no ponto \end{Desc}


Definition at line 110 of file RootFindingBase.c.

References RootFindingBase::mupObj, and RootFindingBase::varPtr.

Referenced by RootFindingBaseReset(), RootFindingBaseSetRange(), RootFindingBissecaoFindNewRange(), RootFindingBissecaoInit(), RootFindingBissecaoPerformIteration(), RootFindingCordasInit(), RootFindingCordasPerformIteration(), RootFindingNewtonRhapsonInit(), RootFindingNewtonRhapsonPerformIteration(), RootFindingPegasoInit(), and RootFindingPegasoPerformIteration().\hypertarget{group____roots_gbcf354e731e02c63652af3a2058e739d}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseGetErrorCode@{RootFindingBaseGetErrorCode}}
\index{RootFindingBaseGetErrorCode@{RootFindingBaseGetErrorCode}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseGetErrorCode]{\setlength{\rightskip}{0pt plus 5cm}int RootFindingBaseGetErrorCode ({\bf RootFindingBaseT} $\ast$ {\em rootsObj})}\hfill}
\label{group____roots_gbcf354e731e02c63652af3a2058e739d}


Obtem o codigo de erro. 



Definition at line 131 of file RootFindingBase.c.

References RootFindingBase::errorCode.\hypertarget{group____roots_gcc5a0a8948e4b02a878f8d534c0bc982}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseGetErrorMessage@{RootFindingBaseGetErrorMessage}}
\index{RootFindingBaseGetErrorMessage@{RootFindingBaseGetErrorMessage}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseGetErrorMessage]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ RootFindingBaseGetErrorMessage ({\bf RootFindingBaseT} $\ast$ {\em rootsObj})}\hfill}
\label{group____roots_gcc5a0a8948e4b02a878f8d534c0bc982}


Obtem a mensagem de erro. 



Definition at line 143 of file RootFindingBase.c.

References RootFindingBase::a, RootFindingBase::b, RootFindingBase::errorCode, msg, MSG\_\-ROOTS\_\-MUP\_\-EVAL\_\-ERROR, MSG\_\-ROOTS\_\-NO\_\-ERROR, MSG\_\-ROOTS\_\-RANGE\_\-ERROR\_\-FA\_\-OR\_\-FB\_\-ISINFINITY, MSG\_\-ROOTS\_\-RANGE\_\-ERROR\_\-PROD\_\-FA\_\-FB\_\-NOT\_\-LT\_\-0, and MSG\_\-ROOTS\_\-UNKNOW\_\-ERROR.\hypertarget{group____roots_g1712b9a29b6e6b15df2195319d5f5d70}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseGetStateCode@{RootFindingBaseGetStateCode}}
\index{RootFindingBaseGetStateCode@{RootFindingBaseGetStateCode}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseGetStateCode]{\setlength{\rightskip}{0pt plus 5cm}int RootFindingBaseGetStateCode ({\bf RootFindingBaseT} $\ast$ {\em rootsObj})}\hfill}
\label{group____roots_g1712b9a29b6e6b15df2195319d5f5d70}


Obtem o codigo referente ao estado do objeto. 



Definition at line 136 of file RootFindingBase.c.

References RootFindingBase::state.\hypertarget{group____roots_ga2434bfeb9592ff54df8601cd1a9a04d}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseGetStateMessage@{RootFindingBaseGetStateMessage}}
\index{RootFindingBaseGetStateMessage@{RootFindingBaseGetStateMessage}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseGetStateMessage]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ RootFindingBaseGetStateMessage ({\bf RootFindingBaseT} $\ast$ {\em rootsObj})}\hfill}
\label{group____roots_ga2434bfeb9592ff54df8601cd1a9a04d}


Obtem a mensagem referente ao estado do objeto. 



Definition at line 164 of file RootFindingBase.c.

References msg, MSG\_\-ROOTS\_\-EXACT\_\-ROOT\_\-FOUND, MSG\_\-ROOTS\_\-RANGE\_\-NOT\_\-SET, MSG\_\-ROOTS\_\-READY, MSG\_\-ROOTS\_\-UNKNOW\_\-STATE, RootFindingBase::state, and RootFindingBase::x.\hypertarget{group____roots_gec634820d94c4205729589fc44676b72}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseHasError@{RootFindingBaseHasError}}
\index{RootFindingBaseHasError@{RootFindingBaseHasError}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseHasError]{\setlength{\rightskip}{0pt plus 5cm}{\bf RootFindingBoolT} RootFindingBaseHasError ({\bf RootFindingBaseT} $\ast$ {\em rootsObj})}\hfill}
\label{group____roots_gec634820d94c4205729589fc44676b72}


Verifica se ha erros. 

\begin{Desc}
\item[Returns:]TRUE caso haja erro \end{Desc}


Definition at line 180 of file RootFindingBase.c.

References RootFindingBase::errorCode.

Referenced by RootFindingBaseSetRange().\hypertarget{group____roots_gafb0a57a39081653e224b3b7e95774f0}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseReset@{RootFindingBaseReset}}
\index{RootFindingBaseReset@{RootFindingBaseReset}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseReset]{\setlength{\rightskip}{0pt plus 5cm}void RootFindingBaseReset ({\bf RootFindingBaseT} $\ast$ {\em rootsObj})}\hfill}
\label{group____roots_gafb0a57a39081653e224b3b7e95774f0}


Reinicializa o objeto struct \hyperlink{structRootFindingBase}{RootFindingBase}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rootsObj}]Ponteiro para o objeto struct \hyperlink{structRootFindingBase}{RootFindingBase} \end{description}
\end{Desc}


Definition at line 47 of file RootFindingBase.c.

References RootFindingBase::e, RootFindingBase::errorCode, infinity(), RootFindingBase::mupObj, RootFindingBaseEval(), and RootFindingBase::state.

Referenced by RootFindingBaseCreate().\hypertarget{group____roots_g66563d156c9a25a8316a9c557e0bf7b8}{
\index{\_\-roots@{\_\-roots}!RootFindingBaseSetRange@{RootFindingBaseSetRange}}
\index{RootFindingBaseSetRange@{RootFindingBaseSetRange}!_roots@{\_\-roots}}
\paragraph[RootFindingBaseSetRange]{\setlength{\rightskip}{0pt plus 5cm}{\bf RootFindingBoolT} RootFindingBaseSetRange ({\bf RootFindingBaseT} $\ast$ {\em rootsObj}, \/  {\bf RootFindingDoubleT} {\em a}, \/  {\bf RootFindingDoubleT} {\em b})}\hfill}
\label{group____roots_g66563d156c9a25a8316a9c557e0bf7b8}


Define o intervalo para procura da raiz. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rootsObj}]Ponteiro para o objeto \hyperlink{structRootFindingBase}{RootFindingBase} \item[{\em a}]\item[{\em b}]\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]TRUE em caso de sucesso, quando f(a) $\ast$ f(b) $<$ 0 'e' f(a), f(b) sejam ambos diferentes de infinito \end{Desc}


Definition at line 77 of file RootFindingBase.c.

References RootFindingBase::a, RootFindingBase::b, RootFindingBase::errorCode, FALSE, isRangeError(), RootFindingBaseEval(), RootFindingBaseHasError(), RootFindingBase::state, and TRUE.